using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace RSStoZPL
{
    public partial class IntervalSet : Form
    {
        public IntervalSet()
        {
            InitializeComponent();
        }

        public static int Prompt()
        {
            IntervalSet diag = new IntervalSet();
            if (diag.ShowDialog() == DialogResult.OK)
            {
                return diag.Interval;
            }
            else
            {
                return -1;
            }
        }

        private void IntervalSet_Load(object sender, EventArgs e)
        {
            numericUpDown1.Maximum = int.MaxValue;
            numericUpDown1.Value = RSStoZPL.Properties.Settings.Default.RunInterval / (1000 * 60);
        }

        public int Interval
        {
            get 
            {
                return ((int)numericUpDown1.Value) * 1000 * 60;
            }
        }
    }
}